package topuc.com.mvp.presenter;

import java.util.MissingFormatArgumentException;

import topuc.com.mvp.inter.CallBack;
import topuc.com.mvp.inter.MvpView;
import topuc.com.mvp.model.IModel;

/**
 * Created by apls on 2018/11/23.
 */
public class MainPresenter {

    private MvpView mvpView;
    private IModel iModel;

    public MainPresenter(final MvpView mvpView){

        MainPresenter.this.mvpView=mvpView;
        iModel=new IModel(new CallBack() {
            @Override
            public void onRequest(String requestData) {
                MainPresenter.this.mvpView.setText(requestData);
            }
        });
    }

    public void getRequest(){
        iModel.getRequest();
    }

}

